#ifndef _UUID_UTIL_H_
#define _UUID_UTIL_H_

class uuidutil
{
public:
	uuidutil();
	~uuidutil();
	/*
	typedef struct _GUID {
	unsigned long  Data1;
	unsigned short Data2;
	unsigned short Data3;
	unsigned char  Data4[ 8 ];
	} GUID;
	*/
	//windows�ڲ���˴��� 3210-54-76-89-101112131415  string 8-4-4-22-222222 
	static int ByteToWinUuidString(const unsigned char* data, int datalen, char* string, int stringlen);
	static int ByteFromWinUuidString(unsigned char* data, int datalen, const char* string, int stringlen);

	/*
	linux �ڲ����� 0123-45-67-89-101112131415 string 8-4-4-22-222222 
	*/
	static int ByteToLinuxUuidString(const unsigned char* data, int datalen, char* string, int stringlen);
	static int ByteFromLinuxUuidString(unsigned char* data, int datalen, const char* string, int stringlen);

	static int ByteToHexString(const unsigned char* data, int datalen, char* string, int stringlen);
	static int ByteFromHexString(unsigned char* data, int datalen, const char* string, int stringlen);
};

#endif

